package com.ld.security.server.admin.modules.gl.api;

import com.ld.security.common.tomcat.anno.AjaxLogKey;
import com.ld.security.server.admin.modules.gl.entity.GlConfigEntity;
import com.ld.security.server.admin.modules.gl.service.IGlConfigService;
import com.ld.security.common.mybatis.base.po.IdPo;
import com.ld.security.common.mybatis.base.vo.DataVo;
import com.ld.security.common.tomcat.base.api.SuperApi;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Api(tags="系统配置Api管理")
@RequestMapping("/api/glConfig")
public class GlConfigApi  extends SuperApi<GlConfigEntity> {

        @Autowired
        IGlConfigService iGlConfigService;

        @AjaxLogKey
        @ApiOperation("切换状态")
        @RequestMapping(value = "/useConfig",method = RequestMethod.POST)
        public DataVo useConfig(@RequestBody IdPo po){
                int total = iGlConfigService.useConfig(po);
                return DataVo.ofMsg("切花状态成功");
        }


}
